/**
 * User: alesj
 * Date: 2005.6.8
 * Time: 9:04:33
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.common.web.tags;

import org.hibernate.type.Type;

public class MetaDataElement implements Comparable {

    private String labelName;
    private String propertName;
    private Type type;
    private Object value;
    private boolean include;
    private SelectRenderer renderer;
    private int order;

    public int compareTo(Object o) {
        MetaDataElement mde = (MetaDataElement)o;
        return getOrder() - mde.getOrder();
    }

    public MetaDataElement(String labelName,
                   String propertName,
                   Type type,
                   Object value,
                   boolean include,
                   SelectRenderer renderer, int order) {
        this.labelName = labelName;
        this.propertName = propertName;
        this.type = type;
        this.value = value;
        this.include = include;
        this.renderer = renderer;
        this.order = order;
    }

    public String getLabelName() {
        return labelName;
    }

    public String getPropertName() {
        return propertName;
    }

    public Type getType() {
        return type;
    }

    public Object getValue() {
        return value;
    }

    public boolean isInclude() {
        return include;
    }

    public SelectRenderer getRenderer() {
        return renderer;
    }

    public int getOrder() {
        return order;
    }

}
